<?
session_start();
function DC($action,$txt)
{
 $decode =explode("=",base64_decode($txt));
  if($decode[0]==$action)
 {   $DC=explode(" ",base64_decode($decode[1]));
 			if($DC[1]=="CT")return addslashes(strip_tags($DC[0]));
		else return FALSE;
 }
}
if(!empty($_GET['news']) && DC("news",$_GET['news']))
{
	$id=DC("news",$_GET['news']);
include 'Connections/conn.php';
$sql="SELECT subject,detail,dateadd, imgpath, name, lastname
FROM sme_news, sme_user
WHERE creator = user_id  AND  newsId='$id'";

$rs = mysql_query ( $sql, $conn );
$row = mysql_num_rows($rs);
$obj = mysql_fetch_array($rs);
	if($row==0)
	{
		echo "<meta http-equiv='refresh' content='0;URL=index.php'>";	exit();
	}
	
}
else{	echo "<meta http-equiv='refresh' content='0;URL=index.php'>";	exit();}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
 <link type="text/css" rel="stylesheet"  href="backstore/backstore_css.css" />
<title>Untitled Document</title>
<link rel="icon" type="image/x-icon" id="favicon" href="backstore/img/faviconc.ico"/>
</head>

<body>
<div align="center">
<h3><?=stripslashes($obj [0]); ?></h3>
<br/>
  <table cellpadding="0" cellspacing="0" >
    <tr bgcolor="#FFFFFF">
      <td >&nbsp;</td> <td >&nbsp;</td> <td >&nbsp;</td>
    </tr>
    <tr>
    <td colspan="3" align="center" bgcolor="#FFFFFF"><?php if($obj[3]!='None'){ ?><img src="new_img/<?=$obj [3]; ?>"  /><?php } ?></td>
    </tr>
    <tr bgcolor="#FFFFFF">
     <td width="89">&nbsp;</td>
      <td><?=$obj [1]; ?></td>
      <td width="89">&nbsp;</td>
    </tr>
  </table>
</div>
</body>
</html>

